import {authRequest} from '@/utils/request'
//发送验证码
export const apiSendCode = (data: { phone: string }) => {
    return authRequest({
        url: '/auc/getVerifyCode',
        method: 'POST',
        data
    })
}
//用户注册
export const apiUserRegister = (data: UserRegisterOption) => {
    return authRequest({
        url: '/auc/register',
        method: 'POST',
        data
    })
}
//账户密码登录
export const apiAccountLogin = (data: AccountLoginOption) => {
    return authRequest<LoginResult>({
        url: '/auc/login',
        method: 'POST',
        data
    })
}
//多账户列表
export const apiAccountList = (data: AccountListOption) => {
    return authRequest<AccountList>({
        url: '/auc/getUserListByPhone',
        method: 'POST',
        data
    })
}
//重置密码
export const apiResetPassword = (data: {userId:string,newPsw:string}) => {
    return authRequest({
        url: '/auc/resetPassword',
        method: 'POST',
        data
    })
}
//用户id登录
export const apiLoginUserId = (data: {userId:number}) => {
    return authRequest<LoginResult>({
        url: '/auc/loginUserId',
        method: 'POST',
        data
    })
}
